package com.rlz.framemm.model;

import com.rlz.base.base.BaseModel;
import com.rlz.base.base.Resource;
import com.rlz.framemm.api.ArticleApi;
import com.rlz.framemm.bean.ArticleBean;
import com.rlz.net.NetParams;

import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;

/**
 * Created by RLZ
 * on 2021/4/8
 */
public class ListModel extends BaseModel {


    public LiveData<Resource<ArticleBean>> getArticleList(int curPage, NetParams netParams) {
        MutableLiveData<Resource<ArticleBean>> liveData = new MutableLiveData<>();
        return observe(createService(ArticleApi.class).getArticleList(curPage), liveData,netParams);
    }
}
